package cn.xshi.common.base;

import java.util.Date;

import cn.xshi.common.util.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
 * @Desc Entity支持类
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Data
@ApiModel(value="BaseEntity支持类对象", description="实体基类")
public class BaseEntity extends DateUtil {

	@ApiModelProperty(value = "乐观锁使用")
	private Integer version;/**乐观锁使用**/

	@ApiModelProperty(value = "创建人名称")
	private String createBy;/**创建人名称**/

	@ApiModelProperty(value = "修改者名称")
	private String modifiedBy;/**修改者名称**/

	@ApiModelProperty(value = "创建人编号")
	private String createId;/**创建人编号**/

	@ApiModelProperty(value = "修改人编号")
	private String updateId;/**修改人编号**/

	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;/**创建时间**/

	@ApiModelProperty(value = "修改时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;/**修改时间**/

	@ApiModelProperty(value = "删除标记：0正常1已删除")
	private Integer delFlag;/**删除标记：0正常1已删除**/

	@ApiModelProperty(value = "sessionId")
	private String sessionId;

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
